package models

import (
	"time"
)

type SysStudent struct {
	Model
	SerialNum           string    `json:"serial_num" gorm:"type:varchar(50);not null;comment:学员编号"`
	CollegeId           int       `json:"college_id" gorm:"type:int(5);not null;default:0;comment:学员院校ID"`
	Name                string    `json:"name" gorm:"type:varchar(50);not null;comment:学员名称"`
	NickName            string    `json:"nick_name" gorm:"type:varchar(100);comment:昵称"`
	Phone               string    `json:"phone" gorm:"type:varchar(20);not null;comment:手机号码"`
	TotalPay            float32   `json:"total_pay" gorm:"type:decimal(10,2);comment:付费总额"`
	UserLabel           string    `json:"user_label" gorm:"type:varchar(50);comment:学员等级 普通/VIP/SVIP"`
	OrderCount          int       `json:"order_count" gorm:"type:int(10);comment:订单总数"`
	UserType            string    `json:"user_type" gorm:"varchar(10);comment:用户类型 线上/线下"`
	Province            int       `json:"province" gorm:"type:int(10);comment:所属大区省份"`
	City                int       `json:"city" gorm:"type:int(10);comment:所属区域"`
	District            int       `json:"district" gorm:"type:int(10);comment:所属区县"`
	Area                int       `json:"area" gorm:"type:int(10);default:0;comment:所属教学点"`
	ShenBenTime         time.Time `json:"shen_ben_time"`
	LastPayTime         time.Time `json:"last_pay_time"`
	TeachRecommender    int       `json:"teach_recommender" gorm:"type:int(10);default:0;comment:老师推荐人ID"`
	Recommender         int       `json:"recommender" gorm:"type:int(10);comment:学生推荐人ID"`
	RmId                int       `json:"rm_id" gorm:"type:smallint(2);comment:大区经理ID"`
	RegionalMId         int       `json:"regional_m_id" gorm:"type:smallint(2);comment:区域经理ID"`
	EnrollmentTeacherId int       `json:"enrollment_teacher_id" gorm:"type:smallint(2);comment:招生老师ID"`
	ClassId             int       `json:"class_id" gorm:"type:smallint(2);comment:班级ID"`
	Source              string    `json:"source" gorm:"type:varchar(20);comment:学员来源"`
	Faculty             string    `json:"faculty" gorm:"type:varchar(20);comment:院系"`
	Major               string    `json:"major" gorm:"type:varchar(50);comment:专业"`
	Status              int       `json:"status" gorm:"type:tinyint(1);default:1;comment:学员状态,1-启用和0-禁用"`
	BuyStatus           int       `json:"buy_status" gorm:"type:tinyint(1);default 1;comment:学生购买状态，1-游客，2-正式，3-结业，4-退学"`
	Divided             int       `json:"divided" gorm:"type:tinyint(1);not null;default:0;comment:学员分班状态，默认0未分班，1-已分班"`
	Balance             float32   `json:"balance" gorm:"type:decimal(10,2);comment:学员余额"`
	Integral            float32   `json:"integral" gorm:"type:decimal(10,2);comment:学员积分"`
	LearnDuration       int       `json:"learn_duration" gorm:"type:int(10);comment:学习时长"`
	IsRegistered        int       `json:"is_registered" gorm:"type:tinyint(2);default:-1;comment:是否完成注册信息填写 -1-没有完成注册信息，1-完成注册信息"`
	EnrollmentYear      string    `json:"enrollment_year" gorm:"type:varchar(20);comment:入学年份"`
	CollegeClass        string    `json:"college_class" gorm:"type:varchar(20);comment:大学所在班级"`
	IdCard              string    `json:"id_card" gorm:"type:varchar(50);comment:身份证ID"`
	QQ                  string    `json:"qq" gorm:"type:varchar(20);comment:QQ号"`
	State               int       `json:"state" gorm:"type:tinyint(2);default:0;comment:学习状态"`
	StudyDuration       int       `json:"study_duration" gorm:"type:int(10);default:0;comment:学习时长"`
	Cover               string    `json:"cover" gorm:"varchar(255);comment:头像"`
	Grade               string    `gorm:"type:varchar(200);default:'';comment:年级" json:"grade"`
	KeBie               string    `gorm:"type:varchar(200);default:'';comment:科别" json:"ke_bie"`
	FollowDirection     string    `gorm:"type:tinyint(1);default:0;comment:学员去向,1-流失，2-放弃，3-成为游客" json:"follow_direction"`
	ProgressStatus      int       `json:"progress_status" gorm:"type:tinyint(1);not null;default:1;comment:学员跟进状态，1-刚添加的学生，2-待联系，3-待分班，4-完成"`
	Logined             string    `json:"logined" gorm:"type:varchar(64);default:'';comment:是否登陆"`
	Explain             string    `json:"explain" gorm:"type:varchar(50);comment:食宿说明"`
	TrainingDays        int       `json:"training_days" gorm:"smallint(5);comment:集训天数"`
	ModelTime
}

func (SysStudent) TableName() string {
	return "sys_student"
}
